package com.study.designPattern.create.abstractFactory;

/**
 * @author ysy
 * @version 1.0
 * @Title: AbastractFactoryTest
 * @Note <b>ProjectName:</b> Pre-research
 * <br><b>PackageName:</b> com.study.designPattern.create.abstractFactory
 * <br><b>ClassName:</b>
 * <br><b>Date:</b>

 */
public class AbastractFactoryTest {
    public static void main(String[] args) {
        AbstractCarFactory carFactory = CarFactoryProducer.getCarFactory("type");
        ICarType benz = carFactory.getCarType("Benz");
        benz.run();

        AbstractCarFactory carFactory1 = CarFactoryProducer.getCarFactory("power");
        ICarPower oil = carFactory1.getCarPower("oil");
        oil.power();
    }
}
